-
Notifications
You must be signed in to change notification settings - Fork 90
fix: workload identity token refresh issue #2071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: workload identity token refresh issue #2071
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the blob CSI driver to always refresh Workload Identity tokens by writing them to a file, adjusts the mount logic in NodeStageVolume to allow token refresh on already-mounted volumes, and adds related deployment settings.
- Always call
GetAuthEnv
and write a federated token file even if the volume is already staged. - Ensure the test creates the expected token directory before running.
- Expose new CSIDriver fields
requiresRepublish
andexpirationSeconds
for token rotation.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
pkg/blob/nodeserver_test.go | Create directory for token file in test setup |
pkg/blob/nodeserver.go | Reorder mount check and error handling around GetAuthEnv |
pkg/blob/blob.go | Write the workload identity token to a file on the node |
deploy/csi-blob-driver.yaml | Add requiresRepublish and expirationSeconds under spec |
Comments suppressed due to low confidence (1)
deploy/csi-blob-driver.yaml:13
- Kubernetes CSIDriver spec uses
requiresRepublish
(lower camelCase) rather thanRequiresRepublish
. Update the field name torequiresRepublish
to match the API schema.
RequiresRepublish: true
c588551
to
fb0e43b
Compare
fb0e43b
to
0864993
Compare
0864993
to
ffc6ec1
Compare
fix fix fix fix fix fix fix
ffc6ec1
to
d2b8da6
Compare
What type of PR is this?
/kind bug
What this PR does / why we need it:
fix: Workload Identity token refresh issue
Which issue(s) this PR fixes:
Fixes #1987
Requirements:
Special notes for your reviewer:
Release note: